USE onExam;
GO

DELETE FROM [Emp] ;
DELETE FROM [Record] ;
DELETE FROM [Customer] ;
DELETE FROM [City] ;
DELETE FROM [Center] ;
DELETE FROM [ClassType] ;
DELETE FROM [DeptType] ;
DELETE FROM [Dept] ;
DELETE FROM [EmpLevel] ;
DELETE FROM [Exercises] ;
DELETE FROM [Grade] ;
DELETE FROM [Group] WHERE GroupId>3;
DELETE FROM [ClassDetail] ;
DELETE FROM [ClassEmp] ;
DELETE FROM [GroupClass] ;
DELETE FROM [GroupPermision] ;
DELETE FROM [Initial] ;
UPDATE dbo.Company SET Tel1=N'',Tel2=N'',Tax1=N'',Tax2=N'',Url=N'';
DELETE FROM [Job] ;
DELETE FROM [PlanFinish] ;
UPDATE dbo.SysSetDetail SET Value3='0' WHERE SysSetId=2;
DELETE FROM [StudyAnswer] ;
DELETE FROM [Region] ;
DELETE FROM [Store] ;
DELETE FROM [Study] ;
DELETE FROM [User] WHERE UserId>1;
DELETE FROM [Teacher] ;
DELETE FROM [Answer] ;
DELETE FROM [ClassRecord] ;
DELETE FROM [Logs] ;
DELETE FROM [ActionType] ;
DELETE FROM [Class] ;

DELETE FROM [Brand] ;

DBCC CHECKIDENT('dbo.[Center]',RESEED,1);
DBCC CHECKIDENT('dbo.[ClassType]',RESEED,1);
DBCC CHECKIDENT('dbo.[Customer]',RESEED,1);
DBCC CHECKIDENT('dbo.[Dept]',RESEED,1);
DBCC CHECKIDENT('dbo.[DeptType]',RESEED,1);
DBCC CHECKIDENT('dbo.[Emp]',RESEED,1);
DBCC CHECKIDENT('dbo.[EmpLevel]',RESEED,1);
DBCC CHECKIDENT('dbo.[Exercises]',RESEED,1);
DBCC CHECKIDENT('dbo.[Grade]',RESEED,1);
DBCC CHECKIDENT('dbo.[ClassDetail]',RESEED,1);
DBCC CHECKIDENT('dbo.[ClassEmp]',RESEED,1);
DBCC CHECKIDENT('dbo.[GroupClass]',RESEED,1);
DBCC CHECKIDENT('dbo.[Initial]',RESEED,1);
DBCC CHECKIDENT('dbo.[Job]',RESEED,1);
DBCC CHECKIDENT('dbo.[PlanFinish]',RESEED,1);
DBCC CHECKIDENT('dbo.[StudyAnswer]',RESEED,1);
DBCC CHECKIDENT('dbo.[Region]',RESEED,1);
DBCC CHECKIDENT('dbo.[Store]',RESEED,1);
DBCC CHECKIDENT('dbo.[Study]',RESEED,1);
DBCC CHECKIDENT('dbo.[User]',RESEED,2);
DBCC CHECKIDENT('dbo.[Teacher]',RESEED,1);
DBCC CHECKIDENT('dbo.[ClassRecord]',RESEED,1);
DBCC CHECKIDENT('dbo.[City]',RESEED,1);
DBCC CHECKIDENT('dbo.[Logs]',RESEED,1);
DBCC CHECKIDENT('dbo.[ActionType]',RESEED,1);
DBCC CHECKIDENT('dbo.[Class]',RESEED,1);
DBCC CHECKIDENT('dbo.[Record]',RESEED,1);
DBCC CHECKIDENT('dbo.[Brand]',RESEED,1);
